﻿using System;
using System.Collections.Generic;

using System.Text;
using QUANLYCHAMCONG.BL.Entities;
using QUANLYCHAMCONG.DAO.DAO;
using System.Data;

namespace QUANLYCHAMCONG.BL.BUS
{
    public class LOAIHDBUS
    {
        public LOAIHDBUS() { }
        public static bool Insert(LOAIHD lhd)
        {
            LOAIHDDAO dao = new LOAIHDDAO();
            return dao.Insert(lhd);
        }
        public static bool Update(LOAIHD lhd)
        {
            LOAIHDDAO dao = new LOAIHDDAO();
            return dao.Update(lhd);
        }
        public static bool Delete(LOAIHD lhd)
        {
            LOAIHDDAO dao = new LOAIHDDAO();
            return dao.Delete(lhd);
        }
        public static DataTable SelectAll()
        {
            LOAIHDDAO dao = new LOAIHDDAO();
            return dao.SelectALL();
        }
        public static DataTable SelectPK(LOAIHD lhd)
        {
            LOAIHDDAO dao = new LOAIHDDAO();
            return dao.SelectByPK(lhd);
        }
        public static string GetID()
        {
            LOAIHDDAO dao = new LOAIHDDAO();
            return "LHD" + dao.GetID().ToString();
        }
    }
}
